<?php

namespace App\Http\Requests\Common\Area;

use Illuminate\Foundation\Http\FormRequest;

class AreaCreate extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * 定义表单规则
     *
     * Date: 2018/05/11
     * @author Tenny
     * @return array
     */
    public function rules()
    {
        return [
            'area_name' => 'required',
        ];
    }

    /**
     * 定义错误响应消息
     *
     * Date: 2018/05/11
     * @author Tenny
     * @return array
     */
    public function messages()
    {
        return [
            'area_name.required' => '请输入地区名',
        ];
    }
}
